
/* First created by JCasGen Thu May 05 14:47:08 CEST 2011 */
package it.uniroma2.art.uima.imdb;

import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSGenerator;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.impl.FeatureImpl;
import org.apache.uima.cas.Feature;
import org.apache.uima.jcas.tcas.Annotation_Type;

/** 
 * Updated by JCasGen Thu May 05 18:28:26 CEST 2011
 * @generated */
public class IMDBMovie_Type extends Annotation_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {return fsGenerator;}
  /** @generated */
  private final FSGenerator fsGenerator = 
    new FSGenerator() {
      public FeatureStructure createFS(int addr, CASImpl cas) {
  			 if (IMDBMovie_Type.this.useExistingInstance) {
  			   // Return eq fs instance if already created
  		     FeatureStructure fs = IMDBMovie_Type.this.jcas.getJfsFromCaddr(addr);
  		     if (null == fs) {
  		       fs = new IMDBMovie(addr, IMDBMovie_Type.this);
  			   IMDBMovie_Type.this.jcas.putJfsFromCaddr(addr, fs);
  			   return fs;
  		     }
  		     return fs;
        } else return new IMDBMovie(addr, IMDBMovie_Type.this);
  	  }
    };
  /** @generated */
  public final static int typeIndexID = IMDBMovie.typeIndexID;
  /** @generated 
     @modifiable */
  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("it.uniroma2.art.uima.imdb.IMDBMovie");
 
  /** @generated */
  final Feature casFeat_title;
  /** @generated */
  final int     casFeatCode_title;
  /** @generated */ 
  public String getTitle(int addr) {
        if (featOkTst && casFeat_title == null)
      jcas.throwFeatMissing("title", "it.uniroma2.art.uima.imdb.IMDBMovie");
    return ll_cas.ll_getStringValue(addr, casFeatCode_title);
  }
  /** @generated */    
  public void setTitle(int addr, String v) {
        if (featOkTst && casFeat_title == null)
      jcas.throwFeatMissing("title", "it.uniroma2.art.uima.imdb.IMDBMovie");
    ll_cas.ll_setStringValue(addr, casFeatCode_title, v);}
    
  
 
  /** @generated */
  final Feature casFeat_year;
  /** @generated */
  final int     casFeatCode_year;
  /** @generated */ 
  public int getYear(int addr) {
        if (featOkTst && casFeat_year == null)
      jcas.throwFeatMissing("year", "it.uniroma2.art.uima.imdb.IMDBMovie");
    return ll_cas.ll_getIntValue(addr, casFeatCode_year);
  }
  /** @generated */    
  public void setYear(int addr, int v) {
        if (featOkTst && casFeat_year == null)
      jcas.throwFeatMissing("year", "it.uniroma2.art.uima.imdb.IMDBMovie");
    ll_cas.ll_setIntValue(addr, casFeatCode_year, v);}
    
  
 
  /** @generated */
  final Feature casFeat_imdbScore;
  /** @generated */
  final int     casFeatCode_imdbScore;
  /** @generated */ 
  public double getImdbScore(int addr) {
        if (featOkTst && casFeat_imdbScore == null)
      jcas.throwFeatMissing("imdbScore", "it.uniroma2.art.uima.imdb.IMDBMovie");
    return ll_cas.ll_getDoubleValue(addr, casFeatCode_imdbScore);
  }
  /** @generated */    
  public void setImdbScore(int addr, double v) {
        if (featOkTst && casFeat_imdbScore == null)
      jcas.throwFeatMissing("imdbScore", "it.uniroma2.art.uima.imdb.IMDBMovie");
    ll_cas.ll_setDoubleValue(addr, casFeatCode_imdbScore, v);}
    
  
 
  /** @generated */
  final Feature casFeat_description;
  /** @generated */
  final int     casFeatCode_description;
  /** @generated */ 
  public String getDescription(int addr) {
        if (featOkTst && casFeat_description == null)
      jcas.throwFeatMissing("description", "it.uniroma2.art.uima.imdb.IMDBMovie");
    return ll_cas.ll_getStringValue(addr, casFeatCode_description);
  }
  /** @generated */    
  public void setDescription(int addr, String v) {
        if (featOkTst && casFeat_description == null)
      jcas.throwFeatMissing("description", "it.uniroma2.art.uima.imdb.IMDBMovie");
    ll_cas.ll_setStringValue(addr, casFeatCode_description, v);}
    
  
 
  /** @generated */
  final Feature casFeat_starsList;
  /** @generated */
  final int     casFeatCode_starsList;
  /** @generated */ 
  public int getStarsList(int addr) {
        if (featOkTst && casFeat_starsList == null)
      jcas.throwFeatMissing("starsList", "it.uniroma2.art.uima.imdb.IMDBMovie");
    return ll_cas.ll_getRefValue(addr, casFeatCode_starsList);
  }
  /** @generated */    
  public void setStarsList(int addr, int v) {
        if (featOkTst && casFeat_starsList == null)
      jcas.throwFeatMissing("starsList", "it.uniroma2.art.uima.imdb.IMDBMovie");
    ll_cas.ll_setRefValue(addr, casFeatCode_starsList, v);}
    
  
 
  /** @generated */
  final Feature casFeat_movieId;
  /** @generated */
  final int     casFeatCode_movieId;
  /** @generated */ 
  public String getMovieId(int addr) {
        if (featOkTst && casFeat_movieId == null)
      jcas.throwFeatMissing("movieId", "it.uniroma2.art.uima.imdb.IMDBMovie");
    return ll_cas.ll_getStringValue(addr, casFeatCode_movieId);
  }
  /** @generated */    
  public void setMovieId(int addr, String v) {
        if (featOkTst && casFeat_movieId == null)
      jcas.throwFeatMissing("movieId", "it.uniroma2.art.uima.imdb.IMDBMovie");
    ll_cas.ll_setStringValue(addr, casFeatCode_movieId, v);}
    
  



  /** initialize variables to correspond with Cas Type and Features
	* @generated */
  public IMDBMovie_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());

 
    casFeat_title = jcas.getRequiredFeatureDE(casType, "title", "uima.cas.String", featOkTst);
    casFeatCode_title  = (null == casFeat_title) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_title).getCode();

 
    casFeat_year = jcas.getRequiredFeatureDE(casType, "year", "uima.cas.Integer", featOkTst);
    casFeatCode_year  = (null == casFeat_year) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_year).getCode();

 
    casFeat_imdbScore = jcas.getRequiredFeatureDE(casType, "imdbScore", "uima.cas.Double", featOkTst);
    casFeatCode_imdbScore  = (null == casFeat_imdbScore) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_imdbScore).getCode();

 
    casFeat_description = jcas.getRequiredFeatureDE(casType, "description", "uima.cas.String", featOkTst);
    casFeatCode_description  = (null == casFeat_description) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_description).getCode();

 
    casFeat_starsList = jcas.getRequiredFeatureDE(casType, "starsList", "uima.cas.FSList", featOkTst);
    casFeatCode_starsList  = (null == casFeat_starsList) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_starsList).getCode();

 
    casFeat_movieId = jcas.getRequiredFeatureDE(casType, "movieId", "uima.cas.String", featOkTst);
    casFeatCode_movieId  = (null == casFeat_movieId) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_movieId).getCode();

  }
}



    